#include <bits/stdc++.h>
using namespace std;

#define dbg(...)
// #define dbg(x...) { cerr << "\033[32;1m" << #x << " -> "; err(x); }
// void err() { cerr << "\033[39;0m" << endl; }
// template<typename T, typename... A>
// void err(T a, A... x) { cout << a << ' '; err(x...); }
const int N = 2e5 + 5;
typedef long long LL;

#define int long long

priority_queue<pair<LL, LL>, vector<pair<int, int>>, greater<pair<int, int>>> q;

struct node
{
    int x, h;
} dat[N];

int d, a, n;
signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    cin >> n >> d >> a;
    LL ans = 0;
    for (int i = 0; i < n; ++i)
    {
        cin >> dat[i].x >> dat[i].h;
        q.emplace(dat[i].x, dat[i].h);
    }
    LL cur = 0;
    while (!q.empty())
    {
        auto p = q.top(); q.pop();
        dbg(cur, p.first, p.second, ans);
        if (p.second < 0)
        {
            cur += p.second;
        }
        else if (p.second > cur)
        {
            LL del = (p.second-cur+a-1) / a;
            ans += del;
            cur += del * a;
            q.emplace(p.first + 2 * d + 1, - del * a);
        }
    }
    // printf("%lld\n", ans);
    cout << ans << endl;
    return 0;
}
